export * from "./path";

// 调试模式
export const DEBUG = window.location.href.includes("debug");
// 按键映射
export const KEY_MAP = [
  { name: "forward", keys: ["ArrowUp", "KeyW"] },
  { name: "backward", keys: ["ArrowDown", "KeyS"] },
  { name: "leftward", keys: ["ArrowLeft", "KeyA"] },
  { name: "rightward", keys: ["ArrowRight", "KeyD"] },
  { name: "run", keys: ["Shift"] },
  { name: "jump", keys: ["Space"] },
  { name: "action1", keys: ["1"] },
  { name: "action2", keys: ["2"] },
  { name: "action3", keys: ["3"] },
  { name: "action4", keys: ["KeyF"] },
];
// 水晶默认属性
export const CRYSTAL_CONFIG = {
  bounces: 3, // 反射次数
  aberrationStrength: 0.01, // 色差强度
  ior: 2.4, // 折射率
  fresnel: 1, // 边缘反射性
  color: "white",
};

// 是否场景B
export const IS_SCENE_B = window.location.href.includes("sceneB");
// 玩家起始位置
export const START_POS = IS_SCENE_B ? [0.82, 1, 11.5] : [-7.6, 1, 4.9];
// 玩家起始镜头朝向 弧度
export const START_DIR = IS_SCENE_B
  ? { x: 0, y: -Math.PI }
  : { x: 0, y: (7 * Math.PI) / 10 };

// 玩家移动速度
export const SPEED = IS_SCENE_B ? 1.2 : 1.2;

// 路由模式
export const IS_HASH_ROUTER = window.location.href.includes("#");
